/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package pojo;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;

/**
 *
 * @author Kanet
 */
public class BanTinPoJo {
    
    // <editor-fold defaultstate="collapsed" desc="1. Thuộc tính">
    private int idBanTin;
    private String tieuDe;
    private String noiDung;
    private Date ngayDang;
    private Date ngayHetHan;
    private int luotXem;
    private String lienKet;
    private String hinhAnh;
    private int giamGia;
    private int giaBan;
    private int giaGoc;
    private String diaChi;
    private LoaiTinPoJo loaiTin;
    private TinhTrangPoJo tinhTrang;
    private TaiKhoanPoJo taiKhoan;
    private KhuVucPoJo khuVuc;
    private DanhMucPoJo danhMuc;   
// </editor-fold>
    
    // <editor-fold defaultstate="collapsed" desc="3. Get/Set">
    public int getidBanTin()
    {
        return idBanTin;
    }
    public void setidBanTin(int idBanTin)
    {
        this.idBanTin = idBanTin;
    }
    public String gettieuDe()
    {
        return tieuDe;
    }
    public void settieuDe(String tieuDe)
    {
        this.tieuDe = tieuDe;
    }
    public String getnoiDung()
    {
        return noiDung;
    }
    public void setnoiDung(String noiDung)
    {
        this.noiDung = noiDung;
    }
    public Date getngayDang(){
        return this.ngayDang;
    }
    public void setngayDang(Date ngayDang)
    {
        this.ngayDang = ngayDang;
    }
    public Date getngayHetHan()
    {
        return this.ngayHetHan;
    }
    public void setngayHetHan(Date ngayHethan)
    {
        this.ngayHetHan = ngayHethan;
    }
    public int getLuotXem()
    {
        return this.luotXem;
    }
    public void setLuotXem(int luotxem)
    {
        this.luotXem= luotxem;
    }
    public String getLienKet()
    {
        return this.lienKet;
    }
    public void setLienKet(String lienket)
    {
        this.lienKet = lienket;
    } 
    public String getHinhAnh()
    {
        return this.hinhAnh;
    }
    public void setHinhAnh(String hinhanh)
    {
        this.hinhAnh = hinhanh;
    }
    public int getGiamGia()
    {
        return this.giamGia;
    }
    public void setGiamGia(int giamgia)
    { 
        this.giamGia =giamgia;        
    }
    public int getGiaBan()
    {
        return this.giaBan;
    }
    public void setGiaBan(int giaban)
    {
        this.giaBan = giaban;
    }
    public int getGiaGoc()
    {
        return this.giaGoc;
    }
    public void setGiaGoc(int giagoc)
    {
        this.giaGoc = giagoc;
    }
    
    public String getDiaChi()
    {
        return this.diaChi;
    }
    public void setDiaChi(String diachi)
    {
        this.diaChi = diachi;
    }
    public LoaiTinPoJo getLoaiTin()
    {
        return this.loaiTin;
    }
    public void setLoaiTin(LoaiTinPoJo loaitin)
    {
        this.loaiTin = loaitin;
    }
    public TinhTrangPoJo getTinhTrang(){
        return this.tinhTrang;
    }
    public void setTinhTrang(TinhTrangPoJo tinhtrang)
    {
        this.tinhTrang = tinhtrang;
    }
    public TaiKhoanPoJo getTaiKhoan()
    {
        return this.taiKhoan;
    }
    public void setTaiKhoan(TaiKhoanPoJo taikhoan)
    {
        this.taiKhoan = taikhoan;
    }
    public KhuVucPoJo getKhuVuc()
    {
        return this.khuVuc;
    }
    public void setKhuVuc(KhuVucPoJo khuvuc)
    {
        this.khuVuc = khuvuc;
    }
    public DanhMucPoJo getDanhMuc()
    {
        return this.danhMuc;
    }
    public void setDanhMuc(DanhMucPoJo danhmuc)
    {
        this.danhMuc = danhmuc;
    }
// </editor-fold>
    public BanTinPoJo() throws ParseException
    {
        this.idBanTin =0;
        this.tieuDe ="";
        this.noiDung="";
        SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
        this.ngayDang = sdf.parse("01/01/1900"); //???
        SimpleDateFormat sdf1 = new SimpleDateFormat("dd/MM/yyyy");
        this.ngayHetHan = sdf1.parse("01/01/1900");
        this.luotXem =0;
        this.lienKet ="";
        this.hinhAnh ="";
        this.giamGia=0;
        this.giaBan=0;
        this.giaGoc=0;
        this.diaChi="";
        this.loaiTin = new LoaiTinPoJo();
        this.taiKhoan = new TaiKhoanPoJo();
        this.khuVuc = new KhuVucPoJo();
        this.danhMuc = new DanhMucPoJo();        
    }
    
}
